import request from "@/utils/request";

export function homeRealtime() {
  return request({
    url: "/home/realtime",
    method: "get",
  });
}

export function homeCar(query) {
  return request({
    url: "/home/realtime/car",
    method: "get",
    params: query,
  });
}

export function homePerson(query) {
  return request({
    url: "/home/realtime/person",
    method: "get",
    params: query,
  });
}

export function homeFac(query) {
  return request({
    url: "/home/realtime/fac",
    method: "get",
    params: query,
  });
}

export function homeFence(query) {
  return request({
    url: "/home/realtime/fence",
    method: "get",
    params: query,
  });
}

export function homeStatistics(query) {
  return request({
    url: "/home/statistic",
    method: "get",
    params: query,
  });
}

export function homeAlarm(query) {
  return request({
    url: "/home/alarm",
    method: "get",
    params: query,
  });
}

export function homeCount() {
  return request({
    url: "/home/count",
    method: "get",
  });
}

export function getTrace(query) {
  return request({
    url: "/home/trace",
    method: "get",
    params: query,
    timeout: 60000,
  });
}

export function exportTrace(query) {
  return request({
    url: "/home/trace/export",
    method: "get",
    params: query,
    timeout: 60000,
  });
}

export function carVideo(query) {
  return request({
    url: "/home/car/video/live",
    method: "get",
    params: query,
  });
}

export function carVideoClose(query) {
  return request({
    url: "/home/car/video/close",
    method: "get",
    params: query,
  });
}

//获取手环健康状态数据
export function getHealth(query) {
  return request({
    url: "/device/watch/health",
    method: "get",
    params: query,
  });
}

// export function carVideoRecord(data) {
//   return request({
//     url: "/home/car/video/recording",
//     method: "post",
//     data: data
//   });
// }

// export function carVideoSave(data) {
//   return request({
//     url: "/home/car/video/save",
//     method: "post",
//     data: data
//   });
// }
